﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleAppB5.grapics
{
    /// <summary>
    /// 长方形
    /// </summary>
    public class Rectangle : Graphical
    {
        private double width = 0;
        private double height = 0;
        public Rectangle()
        {
            Random r = new Random();
            width = r.Next(1, 10);
            height = r.Next(1, 10);
        }
        public override double CalculateArea()
        {
            return this.width + this.height;
        }
    }
}
